| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

AtmosphereEffect.h
1 // AtmosphereEffect.h
3 //
5
6 namespace nkAstraeus
7 {
25 class AtmosphereEffect final : public Effect
26 {
27 public :
28
29 // Constructor, destructor
34 AtmosphereEffect (System* system) noexcept ;
39 virtual ~AtmosphereEffect () ;
40
41 // Getters
45 nkGraphics::Texture* getSunTransmittanceLut () const ;
49 nkGraphics::Texture* getMultiScatteringLut () const ;
53 nkGraphics::Texture* getSourceColorTexture () const ;
57 nkGraphics::Texture* getSourceDepthTexture () const ;
61 nkGraphics::Shader* getLutShader () const ;
65 nkMaths::Vector getSunPosition () const ;
69 nkMaths::Vector getPlanetAlbedo () const ;
73 nkMaths::Vector getRayleighScattering () const ;
77 nkMaths::Vector getRayleighExtinction () const ;
81 nkMaths::Vector getRayleighAbsorb () const ;
85 nkMaths::Vector getMieScattering () const ;
89 nkMaths::Vector getMieExtinction () const ;
93 nkMaths::Vector getMieAbsorb () const ;
97 nkMaths::Vector getOzoneScattering () const ;
101 nkMaths::Vector getOzoneExtinction () const ;
105 nkMaths::Vector getOzoneAbsorb () const ;
109 float getMieG () const ;
113 float getRayleighHeightDensityFactor () const ;
117 float getMieHeightDensityFactor () const ;
121 float getOzoneHeightDensityFactor () const ;
125 float getDistanceFactor () const ;
129 float getSunIlluminanceFactor () const ;
133 float getSunAngularRadius () const ;
137 unsigned int getSunLutSampleCount () const ;
141 unsigned int getMultiScatteringLutSphereSampleCount () const ;
145 unsigned int getMultiScatteringLutMarchSampleCount () const ;
149 unsigned int getRaymarchSampleCount () const ;
156 unsigned int getSunTransmittanceLutWidth () const ;
163 unsigned int getSunTransmittanceLutHeight () const ;
170 unsigned int getMultiScatteringLutWidth () const ;
177 unsigned int getMultiScatteringLutHeight () const ;
181 SHADOW_MAP_PCF getShadowSamplingMethod () const ;
185 float getShadowDepthBias () const ;
189 bool getShadowDebug () const ;
196 bool getUseHalfFloatForLuts () const ;
200 bool getOnlyScatterOnObjects () const ;
204 bool getDisplaySun () const ;
205
206 // Setters
216 void setSourceColorTexture (nkGraphics::Texture* value) ;
225 void setSourceDepthTexture (nkGraphics::Texture* value) ;
234 void setSunPosition (nkMaths::Vector value) ;
243 void setPlanetAlbedo (nkMaths::Vector value) ;
255 void setRayleighScattering (nkMaths::Vector value) ;
267 void setRayleighExtinction (nkMaths::Vector value) ;
279 void setRayleighAbsorb (nkMaths::Vector value) ;
291 void setMieScattering (nkMaths::Vector value) ;
303 void setMieExtinction (nkMaths::Vector value) ;
315 void setMieAbsorb (nkMaths::Vector value) ;
327 void setOzoneScattering (nkMaths::Vector value) ;
339 void setOzoneExtinction (nkMaths::Vector value) ;
351 void setOzoneAbsorb (nkMaths::Vector value) ;
362 void setMieG (float value) ;
374 void setRayleighHeightDensityFactor (float value) ;
386 void setMieHeightDensityFactor (float value) ;
398 void setOzoneHeightDensityFactor (float value) ;
407 void setDistanceFactor (float value) ;
416 void setSunIlluminanceFactor (float value) ;
424 void setSunAngularRadius (float value) ;
434 void setSunTransmittanceLutSampleCount (unsigned int value) ;
445 void setMultiScatteringLutSphereSampleCount (unsigned int value) ;
455 void setMultiScatteringLutMarchSampleCount (unsigned int value) ;
465 void setRaymarchSampleCount (unsigned int value) ;
477 void setShadowSource (nkGraphics::Texture* shadowMap, nkGraphics::Camera* lightCamera) ;
487 void setShadowSamplingMethod (SHADOW_MAP_PCF value) ;
496 void setShadowDepthBias (float value) ;
505 void setShadowDebug (bool value) ;
514 void setSunTransmittanceLutWidth (unsigned int value) ;
523 void setSunTransmittanceLutHeight (unsigned int value) ;
532 void setMultiScatteringLutWidth (unsigned int value) ;
541 void setMultiScatteringLutHeight (unsigned int value) ;
551 void setUseHalfFloatForLuts (bool value) ;
562 void setOnlyScatterOnObjects (bool value) ;
572 void setDisplaySun (bool value) ;
582 void setDebugNumericalInstability (bool value) ;
583
584 // Updates
592 bool refreshLuts () ;
593
594 // Load
595 virtual bool load () override ;
596 virtual void unload () override ;
597
598 public :
599
600 // Statics
611 static nkMemory::UniquePtr<AtmosphereEffect> create (System* system = nullptr) ;
612 } ;
613 }
nkAstraeus::AtmosphereEffect::getMultiScatteringLut
nkGraphics::Texture * getMultiScatteringLut() const
nkAstraeus::AtmosphereEffect::setSourceColorTexture
void setSourceColorTexture(nkGraphics::Texture *value)
nkAstraeus::AtmosphereEffect::getShadowDepthBias
float getShadowDepthBias() const
nkAstraeus::AtmosphereEffect::setShadowSamplingMethod
void setShadowSamplingMethod(SHADOW_MAP_PCF value)
nkAstraeus::AtmosphereEffect::setRayleighAbsorb
void setRayleighAbsorb(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect
An atmosphere effect.
Definition: AtmosphereEffect.h:26
nkAstraeus::AtmosphereEffect::setRayleighExtinction
void setRayleighExtinction(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::load
virtual bool load() override
nkAstraeus::AtmosphereEffect::setMultiScatteringLutHeight
void setMultiScatteringLutHeight(unsigned int value)
nkAstraeus::AtmosphereEffect::setRayleighScattering
void setRayleighScattering(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::setDisplaySun
void setDisplaySun(bool value)
nkAstraeus::AtmosphereEffect::getOzoneScattering
nkMaths::Vector getOzoneScattering() const
nkAstraeus::AtmosphereEffect::~AtmosphereEffect
virtual ~AtmosphereEffect()
nkGraphics::Camera
Offers all controls to model a camera.
Definition: Camera.h:14
nkAstraeus::AtmosphereEffect::setMieAbsorb
void setMieAbsorb(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getShadowDebug
bool getShadowDebug() const
nkAstraeus::AtmosphereEffect::getSourceColorTexture
nkGraphics::Texture * getSourceColorTexture() const
nkAstraeus::AtmosphereEffect::getMieExtinction
nkMaths::Vector getMieExtinction() const
nkGraphics::Texture
A texture used for rendering, hosted on GPU.
Definition: Texture.h:12
nkAstraeus::AtmosphereEffect::getRayleighExtinction
nkMaths::Vector getRayleighExtinction() const
nkAstraeus::AtmosphereEffect::setMieG
void setMieG(float value)
nkAstraeus::AtmosphereEffect::getMultiScatteringLutHeight
unsigned int getMultiScatteringLutHeight() const
nkAstraeus::AtmosphereEffect::getRayleighHeightDensityFactor
float getRayleighHeightDensityFactor() const
nkAstraeus::AtmosphereEffect::getLutShader
nkGraphics::Shader * getLutShader() const
nkAstraeus::AtmosphereEffect::getSunLutSampleCount
unsigned int getSunLutSampleCount() const
nkAstraeus::AtmosphereEffect::setOzoneScattering
void setOzoneScattering(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getMieG
float getMieG() const
nkAstraeus::AtmosphereEffect::setRayleighHeightDensityFactor
void setRayleighHeightDensityFactor(float value)
nkAstraeus::AtmosphereEffect::setMultiScatteringLutWidth
void setMultiScatteringLutWidth(unsigned int value)
nkAstraeus::AtmosphereEffect::getRayleighScattering
nkMaths::Vector getRayleighScattering() const
nkAstraeus::AtmosphereEffect::getDistanceFactor
float getDistanceFactor() const
nkAstraeus::System
The main entry point for nkAstraeus engine.
Definition: System.h:15
nkAstraeus::AtmosphereEffect::refreshLuts
bool refreshLuts()
nkAstraeus::AtmosphereEffect::getOnlyScatterOnObjects
bool getOnlyScatterOnObjects() const
nkAstraeus::AtmosphereEffect::setOzoneHeightDensityFactor
void setOzoneHeightDensityFactor(float value)
nkAstraeus::AtmosphereEffect::getSunAngularRadius
float getSunAngularRadius() const
nkAstraeus::AtmosphereEffect::setOzoneExtinction
void setOzoneExtinction(nkMaths::Vector value)
nkGraphics::Shader
A shader class, feeding data to a Program.
Definition: Shader.h:16
nkAstraeus::AtmosphereEffect::getUseHalfFloatForLuts
bool getUseHalfFloatForLuts() const
nkAstraeus::AtmosphereEffect::getSunTransmittanceLutWidth
unsigned int getSunTransmittanceLutWidth() const
nkAstraeus::AtmosphereEffect::getShadowSamplingMethod
SHADOW_MAP_PCF getShadowSamplingMethod() const
nkAstraeus::AtmosphereEffect::setDistanceFactor
void setDistanceFactor(float value)
nkAstraeus::AtmosphereEffect::getMultiScatteringLutWidth
unsigned int getMultiScatteringLutWidth() const
nkAstraeus::AtmosphereEffect::setOnlyScatterOnObjects
void setOnlyScatterOnObjects(bool value)
nkAstraeus::AtmosphereEffect::setPlanetAlbedo
void setPlanetAlbedo(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getMultiScatteringLutSphereSampleCount
unsigned int getMultiScatteringLutSphereSampleCount() const
nkAstraeus::AtmosphereEffect::setSunAngularRadius
void setSunAngularRadius(float value)
nkAstraeus::AtmosphereEffect::setSunTransmittanceLutHeight
void setSunTransmittanceLutHeight(unsigned int value)
nkAstraeus::AtmosphereEffect::setUseHalfFloatForLuts
void setUseHalfFloatForLuts(bool value)
nkAstraeus::AtmosphereEffect::getMieAbsorb
nkMaths::Vector getMieAbsorb() const
nkAstraeus::SHADOW_MAP_PCF
SHADOW_MAP_PCF
Percentage Closer Filtering settings available for materials and effects supporting the shadow mappin...
Definition: ShadowMapPcf.h:12
nkAstraeus::AtmosphereEffect::getMultiScatteringLutMarchSampleCount
unsigned int getMultiScatteringLutMarchSampleCount() const
nkAstraeus::AtmosphereEffect::getSourceDepthTexture
nkGraphics::Texture * getSourceDepthTexture() const
nkAstraeus::AtmosphereEffect::getOzoneAbsorb
nkMaths::Vector getOzoneAbsorb() const
nkAstraeus::AtmosphereEffect::setShadowDebug
void setShadowDebug(bool value)
nkAstraeus
Encompasses all API of component NilkinsAstraeus.
Definition: BlurComplexEffect.h:7
nkAstraeus::AtmosphereEffect::getRayleighAbsorb
nkMaths::Vector getRayleighAbsorb() const
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkAstraeus::AtmosphereEffect::setMultiScatteringLutSphereSampleCount
void setMultiScatteringLutSphereSampleCount(unsigned int value)
nkAstraeus::AtmosphereEffect::setSunTransmittanceLutWidth
void setSunTransmittanceLutWidth(unsigned int value)
nkAstraeus::Effect
Base class for all effects in the component.
Definition: Effect.h:16
nkAstraeus::AtmosphereEffect::setShadowSource
void setShadowSource(nkGraphics::Texture *shadowMap, nkGraphics::Camera *lightCamera)
nkAstraeus::AtmosphereEffect::setSunPosition
void setSunPosition(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getSunTransmittanceLut
nkGraphics::Texture * getSunTransmittanceLut() const
nkAstraeus::AtmosphereEffect::setMieScattering
void setMieScattering(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::getSunIlluminanceFactor
float getSunIlluminanceFactor() const
nkAstraeus::AtmosphereEffect::getSunPosition
nkMaths::Vector getSunPosition() const
nkAstraeus::AtmosphereEffect::setRaymarchSampleCount
void setRaymarchSampleCount(unsigned int value)
nkAstraeus::AtmosphereEffect::setDebugNumericalInstability
void setDebugNumericalInstability(bool value)
nkAstraeus::AtmosphereEffect::unload
virtual void unload() override
nkAstraeus::AtmosphereEffect::setMieHeightDensityFactor
void setMieHeightDensityFactor(float value)
nkAstraeus::AtmosphereEffect::setSourceDepthTexture
void setSourceDepthTexture(nkGraphics::Texture *value)
nkAstraeus::AtmosphereEffect::setShadowDepthBias
void setShadowDepthBias(float value)
nkAstraeus::AtmosphereEffect::setOzoneAbsorb
void setOzoneAbsorb(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::setMieExtinction
void setMieExtinction(nkMaths::Vector value)
nkAstraeus::AtmosphereEffect::setSunTransmittanceLutSampleCount
void setSunTransmittanceLutSampleCount(unsigned int value)
nkAstraeus::AtmosphereEffect::AtmosphereEffect
AtmosphereEffect(System *system) noexcept
nkAstraeus::AtmosphereEffect::getMieHeightDensityFactor
float getMieHeightDensityFactor() const
nkAstraeus::AtmosphereEffect::getRaymarchSampleCount
unsigned int getRaymarchSampleCount() const
nkAstraeus::AtmosphereEffect::setMultiScatteringLutMarchSampleCount
void setMultiScatteringLutMarchSampleCount(unsigned int value)
nkAstraeus::AtmosphereEffect::getOzoneExtinction
nkMaths::Vector getOzoneExtinction() const
nkAstraeus::AtmosphereEffect::getOzoneHeightDensityFactor
float getOzoneHeightDensityFactor() const
nkAstraeus::AtmosphereEffect::getDisplaySun
bool getDisplaySun() const
nkAstraeus::AtmosphereEffect::setSunIlluminanceFactor
void setSunIlluminanceFactor(float value)
nkMaths::Vector
A 4-component vector class, with floats.
Definition: Vector.h:12
nkAstraeus::AtmosphereEffect::getPlanetAlbedo
nkMaths::Vector getPlanetAlbedo() const
nkAstraeus::AtmosphereEffect::getSunTransmittanceLutHeight
unsigned int getSunTransmittanceLutHeight() const
nkAstraeus::AtmosphereEffect::getMieScattering
nkMaths::Vector getMieScattering() const
nkAstraeus::AtmosphereEffect::create
static nkMemory::UniquePtr< AtmosphereEffect > create(System *system=nullptr)